<?php
session_start();
header("content-type:text/html; charset=utf-8");
require_once("../../utils/conn.php");

    $db = new mysql_db();
    $findMbSql="select * from member where familyNum='".$_SESSION['family_current']."'";
    $members=$db->data($findMbSql);
     if($members["total"]<=0){
         echo ($db->createJson(false,"","system error"));
     }
     else{
      $i= $members["total"];
      $data= array();
      foreach ($members["data"] as $value) {
          //print_r($value);
          $tagArr= $value["myTag"]==null?'""':explode(",",$value["myTag"]) ;
        //  $tagArr=$tagArr==""?"":json_encode($tagArr);
          $data[]='{"faceImg":"'.$value["faceImg"].'","nickname":"'.$value["nickname"] . '","myInfo":"'.$value["myInfo"] . '","gender":"'.$value["gender"] .'","birthday":"'.$value["birthday"] .'","myTag":'.$tagArr."}";
      }
      echo($db->createJson(true,json_encode($data),""));
     }
?>